import TabsView from '@/layouts/tabs/TabsView'
//import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: 'loginPage',
      component: () => import('@/pages/login')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: 'connect',
      name: 'connect',
      component: () => import('@/pages/connect'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'dashboard',
          name: '仪表板',
          meta: {
            icon: 'dashboard'
          },
          component: () => import('@/pages/dashboard')
        },
        {
          path: 'session',
          name: '会话',
          meta: {
            icon: 'desktop',
          },
          component: PageView,
          children: [
            {
              path: 'start',
              name: '开始会话',
              meta: {
                icon: 'api'
              },
              component: () => import('@/pages/session'),
            }
          ]
        },
        {
          path: 'user',
          name: '用户',
          meta: {
            icon: 'user',
          },
          component: PageView,
          children: [
            {
              path: 'manage',
              name: '用户管理',
              meta: {
                icon: 'usergroup-add'
              },
              component: () => import('@/pages/user/manage'),
            }
          ]
        },
        {
          path: 'assets',
          name: '资产',
          meta: {
            icon: 'database'
          },
          component: PageView,
          children: [
            {
              path: 'manage',
              name: '资产管理',
              meta: {
                icon: 'setting'
              },
              component: () => import('@/pages/assets/manage'),
            }
          ]
        },
        {
          path: 'system',
          name: '系统设置',
          meta: {
            icon: 'setting'
          },
          component: PageView,
          children: [
            {
              path: 'theme',
              name: '主题设置',
              meta: {
                icon: 'bg-colors'
              },
              component: () => import('@/pages/settings/theme'),
            },
            {
              path: 'connect',
              name: '连接设置',
              meta: {
                icon: "api"
              },
              component: () => import('@/pages/settings/connect'),
            }
          ]
        },
        {
          name: '验权页面',
          path: 'auth/demo',
          meta: {
            icon: 'file-ppt',
            authority: {
              permission: 'add',
              role: 'add'
            },
            component: () => import('@/pages/demo')
          }
        }
      ]
    }
  ]
}

export default options
